import 'package:flutter/material.dart';
import 'package:rive/rive.dart';

class RivePage extends StatefulWidget {
  const RivePage({Key? key}) : super(key: key);

  @override
  _RivePageState createState() => _RivePageState();
}

class _RivePageState extends State<RivePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title:Text('Rive动画')),
        body:AnimatedContainer(
          duration: Duration(seconds: 1),
          child:RiveAnimation.asset('assets/basketball.riv'),
        )
    );
  }
}
